﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Things.Common;

namespace Things.ThingsWeb
{
    public partial class CustomStatic : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CheckCurrentUser();
            }
        }

        protected void Unnamed8_Click(object sender, ImageClickEventArgs e)
        {
            string code = textfield.Value.Trim();
            if (string.IsNullOrEmpty(code)==false)
            {
                Response.Redirect("TradeCode.aspx?code=" + code);
            }
        }

        protected void CheckCurrentUser()
        {
            if (Session[ConstantString.SessionCurrentBuyerAccount] == null)
            {
                //lbtLogin.Visible = true;
                //lbtRegister.Visible = true;
                //lbtWelcome.Visible = false;
            }
            else
            {
                //lbtLogin.Visible = false;
                //lbtRegister.Visible = false;
                //lbtWelcome.Visible = true;
            }
        }
    }
}